<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>鱿鱼丝_可即食_莞工零食商城</title>
    <!-- <link rel="shortcut icon" href="favicon.ico" /> -->
    <link rel="shortcut icon" href="/static/user/images/guangong.ico">
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_2076816_eo3r4g7r51.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2077656_tefo30nlsx.css">
    <link rel="icon" href="animated_favicon.gif" type="image/gif" />
    <link rel="stylesheet" href="/static/user/css/common.css">
    <link  rel="stylesheet" type="text/css" href="/static/user/css/style.css"/>
    <link  rel="stylesheet" type="text/css" href="/static/user/css/goods.css"/>
    <link rel="stylesheet" type="text/css" href="/static/user/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/user/css/cxls.css">
    <style>
        .pagination{
            text-align: center;
            height: 100px;

            display: inline-block;
        }
        .pagination li{
            display: inline-block;
            padding: 10px;
            margin-left:10px ;

        }
        #commentsFrom img{
            display: inline-block;
            height:100%;
            width:10%;
        }
        /* 陈锦添修改 */
        #buy_btn{
            border-radius: 2px;
            background-color: #eb0742;
            color: #ffffff;
        }
        #buy_btn:hover{
            background-color: #ff5555;
        }
        #fav-btn{
            border-radius: 2px;
            background-color: #efefef;
            border: 1px solid #c4c4c4;
        }
        .add_cart_li{
            margin-top: 55px;
        }
        .detail{
            background-color: #ffffff;
        }
        .z-detail-left{
            margin-top: 20px;
        }
        .go_btn{
            background-color: #eb0742;
            color: #ffffff;
            padding: 5px 12px;
            border-radius: 3px;
        }
        #compage{
            width: 100%;
            height: 40px;
            line-height: 40px;
            margin: 10px 0px;
            position: relative;
        }
        .pagenav{
            position: absolute;
            right: 0;
            height: 40px;
            line-height: 40px;
        }
        .pagenav .step{
            font-size: 14px;
            padding: 4px 10px;
            border-radius: 3px;
        }
        /* 评论区域 */
        .com-list{
            width: 886px;
        }
        .com-list-item{
            border-top: 1px solid #ccc;
            padding: 5px;
            margin-bottom: 25px;
            position: relative;
        }
        .userimg{
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: aquamarine;
            margin-right: 10px;
            overflow: hidden;
        }
        .com-right-side{
            position: absolute;
            left: 75px;
        }
        .username{
            font-size: 14px;
            font-weight: bold;
        }
        .com-list-item p{
            height: 25px;
            line-height: 25px;
        }
        .com-date{
            color: #999999;
            margin-left: 10px;
        }
        .com-neirong{
            margin-top: 5px;
            line-height: 15px;
            height: 30px;
            overflow: hidden;
        }
    </style>
    <script type="text/javascript" src="/static/user/js/magiczoom_plus.js"></script>
    <script type="text/javascript" src="/static/user/js/common.js"></script>
    <script src="/static/user/js/jquery-3.4.1.js"></script>
    <script src="/static/user/js/cart.js"></script>
    <script type="text/javascript" src="/static/user/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/static/user/js/jquery.json.js"></script>
    <script type="text/javascript" src="/static/user/js/transport_jquery.js"></script>
    <script type="text/javascript" src="/static/user/js/utils.js"></script>
    <script type="text/javascript" src="/static/user/js/jquery.SuperSlide.js"></script>
    <script type="text/javascript" src="/static/user/js/shop_common.js"></script>
    <script type="text/javascript" src="/static/user/js/magiczoomplus.js"></script>
    <script type="text/javascript" src="/static/user/js/easydialog.min.js"></script>
    <script type="text/javascript" src="/static/user/js/shop_goods.js"></script>
</head>
<body>
{include file="common/header"}
<!-- <div class="search_result"></div> -->

<div id="wrapper">
    <!-- 目录 -->
    <div class="breadcrumbs cle">
        <div class="menus">您当前的位置：
            <a href=".">首页</a> <code>&gt;</code>
            <a href="getcategoods?id={$cate1.id}">{$cate1.cate_name}</a>
            <code>&gt;</code>
            {$goods.goods_name}
        </div>
    </div>

    <!-- 中间详情显示 -->
    <div class="zhongbu clearfix">
        <div class="left-side left clearfix">
            <div class="detail cle clearfix">
                <div class="detail_img" id="detail_img">
                    <!-- <div class="pic_view">
                        <a href="/static/user/images/215_P_1533496827532.jpg" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                            <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/user/images/215_P_1533496827532.jpg">
                        </a>
                    </div> -->
                    <div class="pic_view" id="pic_view">
                        <!-- <a href="./images/215_P_1533496827532.jpg" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                          <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="./images/215_P_1533496827532.jpg">
                        </a>  -->
                        <!-- <a href="#" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                          <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/user/images/xiangqing0.jpg">
                        </a> 
                        <div class="pic_view_another">
                            <img src="/static/user/images/xiangqing0.jpg" alt="">
                        </div> -->
                    </div> 
                    <div class="item-thumbs" id="item-thumbs">
                        <!-- <a class="prev" href="javascript:void(0);"></a>
                        <a class="next" href="javascript:void(0);"></a> -->
                        <button class="prev" onclick="turnPrev();"></button>
                        <button class="next" onclick="turnNext();"></button>
                        <div class="bd">
                            <ul class="cle" style="float: left;">
                                
                                <!-- <li class="current">
                                    <a href="#" rel="zoom-id: Zoomer"  rev="/static/user/images/xiangqing0.jpg">
                                        <img alt="蟹香红皮烤鸭蛋红心流油咸鸭蛋4枚 60-65g/枚" src="/static/user/images/xiangqing0.jpg">
                                    </a>
                                </li>
                                <li class="">
                                    <a href="#" rel="zoom-id: Zoomer" rev="./images/xiangqing1.jpg"> 
                                        <img alt="蟹香红皮烤鸭蛋红心流油咸鸭蛋4枚 60-65g/枚" src="/static/user/images/xiangqing1.jpg">
                                    </a>
                                </li>
                                <li> 
                                <a href="#"  rel="zoom-id: Zoomer" rev="./images/xiangqing2.jpg"> 
                                    <img alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/user/images/xiangqing2.jpg">
                                </a>
                                </li> -->
                                {volist name="$goodsphoto" id="gp"}
                                 <li>
                                     <a href="#" rel="zoom-id: Zoomer" rev="/static/admin/uploads/{$gp.mid_photo}">
                                        <img alt=""
                                             src="/static/admin/uploads/{$gp.sm_photo}">
                                    </a>
                                </li>
                                 {/volist}
                            </ul>
                        </div>
                    </div>
                </div>
                <form action="javascript:addToCart(215)" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" style="float: left;" class="clearfix">
                    <input type="hidden" id="goodsid" name="id" value="{$id}">
                    <div class="item-info" id="item-info">
                        <dl class="loaded">
                            <dt class="product_name">
                                <h1>{$goods.goods_name}</h1>
                            </dt>
                            <dd class="property">
                                <ul>

                                    <li>
                                        <span class="lbl">市场价</span>
                                        <em class="cancel">￥{$goods.market_price}元</em>
                                    </li>
                                    <li>
                                        <span class="lbl">本店价</span>
                                        <span class="unit"> <strong class="nala_price red" id="ECS_SHOPPRICE">￥{$goods.sale_price}元</strong> </span>
                                    </li>
                                    <li><span class="lbl">销&nbsp;&nbsp;&nbsp;量</span><span>最近售出<em class="red">{$goods.sale_num}</em>件</span>（<a href="#pjxqitem" id="pjxqitem_trig">已有 0 人评价</a>）</li>

                                </ul>
                            </dd>
                            <dd class="tobuy-box cle">
                                <ul class="sku">
<!--                                    <script type="text/javascript">-->
<!--                                        var myString=new Array();-->
<!--                                    </script>-->
                                    <li class="skunum_li cle"> <span class="lbl">数&nbsp;&nbsp;&nbsp;量</span>
                                        <div class="skunum" id="skunum"> <span class="minus" title="减少1个数量"  onclick="MinusNum(this);"><i class="iconfont icon-jian">-</i></span>
                                            <input id="number" name="number" type="text" min="1" value="1" onchange="countNum(0)">
                                            <span class="add" title="增加1个数量" onclick="AddNum(this);"><i class="iconfont icon-jia">+</i></span> <cite class="storage"> 件 </cite>
                                        </div>
                                        <div class="skunum" id="skunum">
                                            <cite class="storage">(<font id="shows_number">{$goods.reserve}件</font>)</cite>
                                        </div>
                                    </li>
                                    <li class="add_cart_li">
                                        <a href="/user/cart/getcart" class="btn" onclick="cl()" id="buy_btn"><i class="iconfont icon-gouwuche"></i>加入购物车</a>
                                        <a id="fav-btn" class="graybtn" onclick="collect(this,{$goods.goods_id})" style="cursor: pointer"><i class="iconfont icon-shoucang" {if $is_collect==1}style="color:red"{/if} ></i>收藏</a>
                                    </li>

                                </ul>
                            </dd>
                        </dl>
                    </div>
                </form>
            </div>
            <div class="z-detail-left">
                <div class="tabs_bar_warp">
                    <div class="tabs_bar" id="tabs_bar">
                        <ul>
                            <li class="current_select"> <a class="spxqitem" rel="nofollow" href="javascript:void(0);">商品详情</a> </li>
                            <li class=""><a class="pjxqitem" href="javascript:void(0);" name="pjxqitem" rel="nofollow">评价详情(<em>0</em>)</a></li>
                        </ul>
                    </div>
                </div>
                <div class="product_tabs">
                    <div class="sectionbox z-box" id="spxqitem">
                        <div class="spxq_main">
                            <div>
                                <div>
                                    <table>
                                        <tbody>
                                        <tr>
                                            <td width="20%" class="th"> 产品名称 :</td>
                                            <td width="80%">{$goods.goods_name}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <p>&nbsp; </p>
                            </div>
                            <!--------------------------- 商品详细信息 ------------------------------>
                            <div class="spxq_dec"><p>&nbsp;<span style="font-weight: 700; color: rgb(153, 153, 153); font-family: tahoma, arial, 微软雅黑, sans-serif;">产品参数：</span></p>
                                <ul id="J_AttrUL" style="margin: 0px; padding: 0px 20px 18px; list-style: none; zoom: 1; border-top: 1px solid rgb(255, 255, 255); color: rgb(64, 64, 64); font-family: tahoma, arial, 微软雅黑, sans-serif;">
                                    <li title="SC12237068100383" style="margin: 10px 15px 0px 0px; padding: 0px; list-style: none; display: inline; float: left; width: 220px; height: 18px; overflow: hidden; line-height: 18px; vertical-align: top; white-space: nowrap; text-overflow: ellipsis; color: rgb(102, 102, 102);">厂家：{$goods.manufactor}</li>
                                    <li title="龙口市万顺昌水产食品有限公司" style="margin: 10px 15px 0px 0px; padding: 0px; list-style: none; display: inline; float: left; width: 220px; height: 18px; overflow: hidden; line-height: 18px; vertical-align: top; white-space: nowrap; text-overflow: ellipsis; color: rgb(102, 102, 102);">保质期：{$goods.qualityday}</li>
                                    <li title="龙口市石良镇石良集村" style="margin: 10px 15px 0px 0px; padding: 0px; list-style: none; display: inline; float: left; width: 220px; height: 18px; overflow: hidden; line-height: 18px; vertical-align: top; white-space: nowrap; text-overflow: ellipsis; color: rgb(102, 102, 102);">净含量:{$goods.weight}{$goods.unit}</li>
                                    <li title="0535-2126868" style="margin: 10px 15px 0px 0px; padding: 0px; list-style: none; display: inline; float: left; width: 220px; height: 18px; overflow: hidden; line-height: 18px; vertical-align: top; white-space: nowrap; text-overflow: ellipsis; color: rgb(102, 102, 102);">口味:{$goods.flavor}</li>
<!--                                    <li title="鱿鱼、白砂糖、乳糖、食用盐、味精、香辛料、淀粉" style="margin: 10px 15px 0px 0px; padding: 0px; list-style: none; display: inline; float: left; width: 220px; height: 18px; overflow: hidden; line-height: 18px; vertical-align: top; white-space: nowrap; text-overflow: ellipsis; color: rgb(102, 102, 102);">配料表：鱿鱼、白砂糖、乳糖、食用盐、味精、香辛料、淀粉</li>-->
                                    {volist name="goodsphoto" id="gp"}
                                    <p style="margin: 1.12em 0px; padding: 0px; line-height: 1.4; font-family: tahoma, arial, 宋体, sans-serif; font-size: 14px; text-align: center;"><img align="absmiddle" src="/static/admin/uploads/{$gp.big_photo}" class="img-ks-lazyload" style="margin: 0px; padding: 0px; border: 0px; animation: ks-fadeIn 350ms linear 0ms 1 normal both; opacity: 1; vertical-align: top; max-width: 100%; float: none;" alt="" /></p>
<!--                                    <p style="text-align: center;"><img class="desc_anchor img-ks-lazyload" id="desc-module-2" src="https://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif" style="margin: 0px; padding: 0px; border: 0px; height: 1px; display: block; clear: both; animation: ks-fadeIn 350ms linear 0ms 1 normal both; opacity: 1; vertical-align: top; max-width: 100%; font-family: tahoma, arial, 宋体, sans-serif; font-size: 14px;" alt="" /></p>-->
<!--                                    <p style="margin: 1.12em 0px; padding: 0px; line-height: 1.4; font-family: tahoma, arial, 宋体, sans-serif; font-size: 14px; text-align: center;"><img align="absmiddle" src="https://img.alicdn.com/imgextra/i4/2385970121/TB23mTFmC0mpuFjSZPiXXbssVXa_!!2385970121.jpg" class="img-ks-lazyload" style="margin: 0px; padding: 0px; border: 0px; animation: ks-fadeIn 350ms linear 0ms 1 normal both; opacity: 1; vertical-align: top; max-width: 100%; float: none;" alt="" /><img align="absmiddle" src="https://img.alicdn.com/imgextra/i3/2385970121/TB2ltWlgxRDOuFjSZFzXXcIipXa_!!2385970121.jpg" class="img-ks-lazyload" style="margin: 0px; padding: 0px; border: 0px; animation: ks-fadeIn 350ms linear 0ms 1 normal both; opacity: 1; vertical-align: top; max-width: 100%; float: none;" alt="" /><img align="absmiddle" src="https://img.alicdn.com/imgextra/i2/2385970121/TB2f1algxRDOuFjSZFzXXcIipXa_!!2385970121.jpg" class="img-ks-lazyload" style="margin: 0px; padding: 0px; border: 0px; animation: ks-fadeIn 350ms linear 0ms 1 normal both; opacity: 1; vertical-align: top; max-width: 100%; float: none;" alt="" /></p>-->
                                {/volist}
                                </ul></div>
                        </div>
                    </div>

                    <!--------------------------- 评价详情内容 ------------------------------>
                    <div class="z-box sectionbox clearfix">
                        <script type="text/javascript" src="/static/user/js/transport_jquery.js">
                        </script><script type="text/javascript" src="/static/user/js/utils.js">
                        </script><div class="z-detail-com-box" id="ECS_COMMENT">
                        <div class="z-detail-point-box cle clearfix" style="border-width:0 0 1px 0">
                            <div class="z-detail-point-box-left">
                                <p><font>温馨提示：</font>因厂家更改产品包装、产地或者更换随机附件等没有任何提前通知，且每位咨询者购买情况、提问时间等不同，为此以下回复仅对提问者3天内有效，其他网友仅供参考！若由此给您带来不便请多谅解！</p>
                            </div>
                            <div class="z-detail-point-box-right">
                                <div>对自己使用过的商品进行评价，它将成为大家购买参考依据。</div>
                                <div><font>评论隐私保护：</font>1.匿名评论；2.注册用户评论(加密处理)</div>
                                <div class="good_com_box"> 用户可放心发表使用后的心得感受<a href="javascript:void(0);" onClick="commentsFrom()" id="go_com" class="btn go_btn">我要评价</a>  </div>
                            </div>
                        </div>
                        <div class="z-com-box-head">
                            <div class="z-select"> </div>
                            全部评价（0） </div>
                        <div class="z-com-list" id="ECS_COMMENT">
                            <!-- 暂时还没有任何用户评论 -->
                            <ul class="com-list clearfix">
                                {volist name="comment" id="c"}
                                <li class="com-list-item clearfix">
                                    <div class="userimg left-side left clearfix">
                                        <img src="/static/user/uploads/picture/{$c.picture}" alt="">
                                    </div>
                                    <div class="com-right-side">
                                        <div class="com-info">
                                            <p>
                                                <span class="username">{$c.name}</span>
                                                <span class="com-date">{$c.date}</span>
                                            </p>
                                            <div class="com-neirong">
                                                {$c.content}
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                {/volist}

                            </ul>
                            <div id="compage">
                                <div class="pagenav">
                                    <div style="width: 100%;text-align: center">{$comment->render()|raw}</div>
                                </div>
                            </div>
                        </div>
                        <script type="Text/Javascript" language="JavaScript">

                            function selectPage(sel)
                            {
                                sel.form.submit();
                            }

                        </script>

                        <!--填写评论信息的列表  -->
                        <div id="commentsFrom">
                            <form action="javascript:;" onsubmit="submitComment(this)" method="post" name="commentForm" id="commentForm">
                                <ul class="form addr-form" id="addr-form">
                                    <span style="position:absolute; right:10px; top:5px; font-size:24px; cursor:pointer;" onClick="easyDialog.close();">×</span>
                                    <li>
                                        <label>用户名</label>
                                        匿名用户      </li>
                                    <li>
                                        <label>E-mail</label>
                                        <input type="text" name="email" id="email"  maxlength="100" value="" class="txt"/>
                                    </li>
                                    <li>
                                        <label>评价等级</label>
                                        <input name="comment_rank" type="radio" value="1" id="comment_rank1" />
                                        <img src="/static/user/images/stars1.gif" />
                                        <input name="comment_rank" type="radio" value="2" id="comment_rank2" />
                                        <img src="/static/user/images/stars2.gif" />
                                        <input name="comment_rank" type="radio" value="3" id="comment_rank3" />
                                        <img src="/static/user/images/stars3.gif" />
                                        <input name="comment_rank" type="radio" value="4" id="comment_rank4" />
                                        <img src="/static/user/images/stars4.gif" />
                                        <input name="comment_rank" type="radio" value="5" checked="checked" id="comment_rank5" />
                                        <img src="/static/user/images/stars5.gif" />
                                    </li>
                                    <li>
                                        <label>评论内容</label>
                                        <textarea name="content" class="txt" style="height:80px; width:300px;"></textarea>
                                    </li>
                                    <li>
                                        <label>验证码</label>

                                        <input type="text" class="txt" name="captcha" maxlength="6">
                                        <img src="captcha.php?218154247" alt="captcha" onClick="this.src='captcha.php?'+Math.random()" width="100" height="34" style="position:relative; top:13px;" > </li>
                                    <li>
                                        <input type="hidden" name="cmt_type" value="0" />
                                        <input type="hidden" name="id" value="215" />
                                        <label>&nbsp;&nbsp;&nbsp;&nbsp;</label>
                                        <input name="" type="submit"  value="提交评论" class="btn" style="border:none; height:40px; cursor:pointer; width:150px; font-size:16px;">
                                    </li>
                                </ul>
                            </form>
                        </div>


                        <!-- 提交评论信息验证提示 -->

                        <script type="text/javascript">
                            //<![CDATA[
                            var cmt_empty_username = "请输入您的用户名称";
                            var cmt_empty_email = "请输入您的电子邮件地址";
                            var cmt_error_email = "电子邮件地址格式不正确";
                            var cmt_empty_content = "您没有输入评论的内容";
                            var captcha_not_null = "验证码不能为空!";
                            var cmt_invalid_comments = "无效的评论内容!";

                            /**
                             * 提交评论信息
                             */
                            function submitComment(frm)
                            {
                                var cmt = new Object;

                                cmt.username        = frm.elements['username'].value;
                                cmt.email           = frm.elements['email'].value;
                                cmt.content         = frm.elements['content'].value;
                                cmt.type            = frm.elements['cmt_type'].value;
                                cmt.id              = frm.elements['id'].value;
                                cmt.enabled_captcha = frm.elements['enabled_captcha'] ? frm.elements['enabled_captcha'].value : '0';
                                cmt.captcha         = frm.elements['captcha'] ? frm.elements['captcha'].value : '';
                                cmt.rank            = 0;

                                for (i = 0; i < frm.elements['comment_rank'].length; i++)
                                {
                                    if (frm.elements['comment_rank'][i].checked)
                                    {
                                        cmt.rank = frm.elements['comment_rank'][i].value;
                                    }
                                }

                                if (cmt.username.length == 0)
                                {
                                    alert(cmt_empty_username);
                                    return false;
                                }

                                if (cmt.email.length > 0)
                                {
                                    if (!(Utils.isEmail(cmt.email)))
                                    {
                                        alert(cmt_error_email);
                                        return false;
                                    }
                                }
                                else
                                {
                                    alert(cmt_empty_email);
                                    return false;
                                }

                                if (cmt.content.length == 0)
                                {
                                    alert(cmt_empty_content);
                                    return false;
                                }

                                if (cmt.enabled_captcha > 0 && cmt.captcha.length == 0 )
                                {
                                    alert(captcha_not_null);
                                    return false;
                                }

                                Ajax.call('comment.php', 'cmt=' + $.toJSON(cmt), commentResponse, 'POST', 'JSON');
                                return false;
                            }

                            /**
                             * 处理提交评论的反馈信息
                             */
                            function commentResponse(result)
                            {
                                if (result.message)
                                {
                                    alert(result.message);
                                }

                                if (result.error == 0)
                                {
                                    var layer = document.getElementById('ECS_COMMENT');

                                    if (layer)
                                    {
                                        layer.innerHTML = result.content;
                                    }
                                }
                                easyDialog.close();
                                window.location.reload();
                            }

                            function commentsFrom(){
                                easyDialog.open({
                                    container : 'commentsFrom'
                                });
                            }
                        </script>
                    </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="right-side right clearfix">
            <div class="z-detail-right">
                <div class="tabs_bar_right">
                    <div class="tabs_bar2">热卖商品</div>
                </div>
                <div class="hot_box">
                    <ul>
                        {volist name="$goodshot" id="gs"}
                        <li>
                            <a href="/user/index/getgoodsdetail?id={$gs.id}" target="_self">
                                <img width="194px" height="194px" src="/static/admin/uploads/{$gs.thumb}">
                                <p>{$gs.goods_name}</p>
                                <p class="hot_price">￥{$gs.sale_price}元</p>
                            </a>
                        </li>
                        {/volist}
                    </ul>
                </div>
            </div>
        </div>
    </div>



    <!-- <div class="detail_bgcolor">
      <div class="z-detail-box cle"> -->

    <!------------------ 右边页面部分：热卖商品 ----------------------->

    <!-- </div>
  </div> -->
</div>

<!------------------- 商品成功加入购物车提示------------------>
<div class="add_ok" id="cart_show">
    <div class="tip">
        <i class="iconfont"></i>商品已成功加入购物车
    </div>
    <div class="go">
        <a href="javascript:easyDialog.close();" class="back">&lt;&lt;继续购物</a>
    </div>
</div>

<!------------------ 楚雄零食商城页尾 ------------------------>
{include file="common/footer"}
<!-- --------------实现返回顶部功能 ------------------->
<script>
    $(function(){
        $(window).scroll(function(){
            if($(window).scrollTop()>100){  //距顶部多少像素时，出现返回顶部按钮
                $("#side-bar .gotop,.right_sidebar").fadeIn();
            }
            else{
                $("#side-bar .gotop,.right_sidebar").fadeOut();
            }
        });
        $("#side-bar .gotop").click(function(){
            $('html,body').animate({'scrollTop':0},600); //返回顶部动画 数值越小时间越短
        });
    });
</script>
<ul id="side-bar" class="side-pannel side-bar" >
    <a href="javascript:;" class="gotop" style="display:none;"></a>
</ul>

<script>
    function cl(){
        $.ajax({
            type:'post',
            data:{
                'id':$('#goodsid').val(),
                'num':$('#number').val()
            },
            url:'/user/cart/addcart',
            success:function(res){
                console.log(res);
            }
        })
    }

</script>

<!-- 陈锦添修改 -->
<script>
    $(function(){
        json = "{$jsonp}".replace(/&quot;/g,"\"");
        json=JSON.parse(json);
        console.log(json.length);
        $(".pic_view").html(`<a href="#" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                          <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/admin/uploads/`+ json[0].mid_photo +`">
                        </a> 
                        <div class="pic_view_another">
                            <img src="/static/admin/uploads/`+ json[0].mid_photo +`" alt="">
                        </div>`);
        $(".item-thumbs ul").find('li').eq(0).addClass("current");
    })
    // 处理小图片
    var index = 0;
    var obj = document.getElementById("pic_view");
    var len = $(".item-thumbs ul").find('li').length;
    // 判断当前index
    function findIndex(){
      var i;
      for(i = 0; i < len; i++){
        if($(".item-thumbs ul").find('li').eq(i).hasClass("current") === true){
          index = i;
        }
      }
    }
    function turnPrev(){
          findIndex();
          if(index == 0){
              $(".item-thumbs ul").find('li').eq(index).removeClass("current");
              $(".item-thumbs ul").find('li').eq($(".item-thumbs ul").find('li').length-1).addClass("current");
              index = $(".item-thumbs ul").find('li').length - 1;
              obj.innerHTML = `<a href="#" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                  <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/admin/uploads/` + json[index].mid_photo +`">
                </a>
                <div class="pic_view_another">
                    <img src="/static/admin/uploads/` + json[index].mid_photo +`" alt="">
                </div>
              `;
          }
          else{
              $(".item-thumbs ul").find('li').eq(index).removeClass("current");
              $(".item-thumbs ul").find('li').eq(index-1).addClass("current");
              // obj.innerHTML = `<a href="./images/xiangqing`+ (index-1) +`.jpg" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
              //     <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="./images/xiangqing`+ (index-1) +`.jpg">
              //   </a> 
              // `;
              index--;
              obj.innerHTML = `<a href="#" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                  <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/admin/uploads/` + json[index].mid_photo +`">
                </a> 
                <div class="pic_view_another">
                    <img src="/static/admin/uploads/` + json[index].mid_photo +`" alt="">
                </div>
              `;
          }
    }
    function turnNext(){
      findIndex();
      if(index == ($(".item-thumbs ul").find('li').length - 1) ){
              $(".item-thumbs ul").find('li').eq($(".item-thumbs ul").find('li').length-1).removeClass("current");
              $(".item-thumbs ul").find('li').eq(0).addClass("current");
              index = 0;
              obj.innerHTML = `<a href="#" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                  <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/admin/uploads/` + json[index].mid_photo +`">
                </a> 
                <div class="pic_view_another">
                    <img src="/static/admin/uploads/` + json[index].mid_photo +`" alt="">
                </div>
              `;
          }
      else{
              $(".item-thumbs ul").find('li').eq(index).removeClass("current");
              $(".item-thumbs ul").find('li').eq((index+1)).addClass("current");
              index++;
              obj.innerHTML = `<a href="#" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                  <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/admin/uploads/` + json[index].mid_photo +`">
                </a> 
                <div class="pic_view_another">
                    <img src="/static/admin/uploads/` + json[index].mid_photo +`" alt="">
                </div>
              `;
          }
    }
    // 点击小图切换pic_view图片
    $("#item-thumbs li a").click(function(){
          $("#item-thumbs li").removeClass("current");
      $(this).parent().addClass("current");
      findIndex();
      obj.innerHTML = `<a href="#" class="MagicZoomPlus" id="Zoomer" rel="hint-text: ; selectors-effect: false; selectors-class: current; zoom-distance: 10;zoom-width: 400; zoom-height: 400;" onclick="window.open('gallery.php?id=215'); return false;">
                  <img  alt="万顺昌 鱿鱼丝500g包邮手撕鱿鱼片即食海鲜零食小吃批发青岛特产" src="/static/admin/uploads/` + json[index].mid_photo +`">
                </a> 
                <div class="pic_view_another">
                    <img src="/static/admin/uploads/` + json[index].mid_photo +`" alt="">
                </div>
              `;
      })




    //收藏
    function collect(_this,$id) {
        $.ajax(
            {
                url:'collectajax',
                type:'post',
                data:{
                    'id':$id
                },
                success:function (res) {
                    if(res==1){
                        console.log('收藏成功!');
                        $(_this).find('i').css('color','red');

                    }else if(res==2){
                        $(_this).find('i').css('color','rgb(153,153,153)');
                        console.log('取消收藏!');
                    }
                }
            }
        )
    }
</script>
</body>
</html>
